package com.bailiban.search.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author zhulang
 * @Classname Article
 * @Description Article
 */
@Data
@Document(indexName = "bailiban")
public class Article {
    @Id
    private String id;
    @Field(type = FieldType.Keyword, searchAnalyzer = "ik_smart", analyzer = "ik_max_word")
    private String title;
    @Field(type = FieldType.Text, searchAnalyzer = "ik_smart", analyzer = "ik_max_word")
    private String content;
    @Field(type = FieldType.Integer)
    private int state;
}
